package org.metasketch.diagram.javafx.graphics;

import javafx.scene.shape.Polygon;

import org.metasketch.editor.links.LineEnd;
import org.metasketch.editor.links.LinkEndType;

public class TriangleEndType extends LineEnd {

	Polygon polygon1 = new Polygon(new double[] { 5, 0, 0, 20, 10, 20 });

	public TriangleEndType(LinkEndType endType) {

		if (endType == LinkEndType.TRIANGLE) {
			polygon1.setStyle("-fx-stroke: black;  -fx-stroke-width: 2; -fx-fill: white; ");
		} else if (endType == LinkEndType.FILLEDTRIANGLE)
			polygon1.setStyle("-fx-stroke: black;  -fx-stroke-width: 2; -fx-fill: black; ");

		getChildren().add(polygon1);

	}

	// @Override
	// public void setNewPosition(int x, int y, int sectionX, int sectionY) {
	// setTranslateX(x);
	// setTranslateY(y);
	//
	// }

}
